<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>CSS文本外观之文字对齐</title>
  <style>
    h1 {
      /* 本质是让h1盒子里面的文字水平居中对齐 */
      /* text-align: center; */
      text-align: right;
      /* text-align: left; //没写默认是左对齐 */
    }
  </style>
</head>

<body>
  <h1>居中对齐的标题</h1>
</body>

</html>